package jmine.tec.web.front.domain;

import bancosys.tec.persist.builders.AbstractDBBuilder;
import bancosys.tec.utils.date.Timestamp;

/**
 * @author lundberg
 */
public class BackOfficeRequestRevisionBuilder extends AbstractDBBuilder<BackOfficeRequestRevision> {

    private BackOfficeRequestRevision bean = this.createBean();

    public static BackOfficeRequestRevisionBuilder aRevision() {
        BackOfficeRequestRevisionBuilder builder = new BackOfficeRequestRevisionBuilder();
        builder.user("john.smith");
        builder.timestamp(new Timestamp());
        builder.outcome(BackOfficeRequestRevisionOutcome.AUTHORIZED);
        builder.comment("comment");
        return builder;
    }

    @Override
    protected BackOfficeRequestRevision doBuild() {
        return this.bean;
    }

    public BackOfficeRequestRevisionBuilder request(BackOfficeRequest value) {
        this.bean.setRequest(value);
        return this;
    }

    public BackOfficeRequestRevisionBuilder user(String value) {
        this.bean.setUser(value);
        return this;
    }

    public BackOfficeRequestRevisionBuilder timestamp(Timestamp value) {
        this.bean.setTimestamp(value);
        return this;
    }

    public BackOfficeRequestRevisionBuilder outcome(BackOfficeRequestRevisionOutcome value) {
        this.bean.setOutcome(value);
        return this;
    }

    public BackOfficeRequestRevisionBuilder comment(String value) {
        this.bean.setComment(value);
        return this;
    }

}
